package cn.zw.design.order.formal;

public class Invoker {
	
	private Command command;
	
	private Command undoCommand;
	
	public void setCommand(Command command) {
		this.command = command;
	}
	
	public void runCommand(){
		undoCommand = command;
		command.execute();
	}
	
	public  void  runUndoCommand(){
		undoCommand.undo();
	}
	

}
